﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace PSE.Tools.SchemaComparer.WindowsApp
{
    /// <summary>
    /// Interaction logic for ValuesView.xaml
    /// </summary>
    public partial class ValuesView : Window
    {
        public string SourceSchemaName
        {
            get { return (string)GetValue(SourceSchemaNameProperty); }
            set { SetValue(SourceSchemaNameProperty, value); }
        }

        // Using a DependencyProperty as the backing store for SourceSchemaName.  This enables animation, styling, binding, etc...
        public static readonly DependencyProperty SourceSchemaNameProperty =
            DependencyProperty.Register("SourceSchemaName", typeof(string), typeof(ValuesView), new UIPropertyMetadata(string.Empty));


        public string SourceValue
        {
            get { return (string)GetValue(SourceValueProperty); }
            set { SetValue(SourceValueProperty, value); }
        }

        // Using a DependencyProperty as the backing store for SourceValue.  This enables animation, styling, binding, etc...
        public static readonly DependencyProperty SourceValueProperty =
            DependencyProperty.Register("SourceValue", typeof(string), typeof(ValuesView), new UIPropertyMetadata(string.Empty));


        public string TargetSchemaName
        {
            get { return (string)GetValue(TargetSchemaNameProperty); }
            set { SetValue(TargetSchemaNameProperty, value); }
        }

        // Using a DependencyProperty as the backing store for TargetSchemaName.  This enables animation, styling, binding, etc...
        public static readonly DependencyProperty TargetSchemaNameProperty =
            DependencyProperty.Register("TargetSchemaName", typeof(string), typeof(ValuesView), new UIPropertyMetadata(string.Empty));

        public string TargetValue
        {
            get { return (string)GetValue(TargetValueProperty); }
            set { SetValue(TargetValueProperty, value); }
        }

        // Using a DependencyProperty as the backing store for TargetValue.  This enables animation, styling, binding, etc...
        public static readonly DependencyProperty TargetValueProperty =
            DependencyProperty.Register("TargetValue", typeof(string), typeof(ValuesView), new UIPropertyMetadata(string.Empty));


        public ValuesView(string sourceSchemaName, string sourceValue, string targetSchemaName, string targetValue)
        {
            InitializeComponent();

            this.DataContext = this;
            this.SourceSchemaName = sourceSchemaName;
            this.SourceValue = sourceValue;
            this.TargetSchemaName = targetSchemaName;
            this.TargetValue = targetValue;
        }
    }
}
